﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace XGame
{

    /// <summary>
    /// This is the core interface for XGame. Virtually all objects in XBase will
    /// implement this interface to provide a guaranteed method for an object
    /// to set itself up.
    /// </summary>
    public interface XBase
    {

        /// <summary>
        /// The initialize method is where any object
        /// that implements the XBase interface may initialize itself
        /// </summary>
        void Initialize();

    }

    /// <summary>
    /// The XUpdate interface provides a consistent way for any class to be updated with the game timer
    /// </summary>
    public interface XUpdate : XBase
    {
        void Update(GameTime aTime);
    }


    /// <summary>
    /// The XDraw interface extends the XUpdate interface and allows for a given
    /// object to not only receive updates wtih the game loop, but also receive draw
    /// requests as well.
    /// </summary>
    public interface XDraw : XUpdate
    {
        void Draw(SpriteBatch aSpriteBatch);
    }

    /// <summary>
    /// The XScreen interface is required by any objects that wish to be drawn and updated
    /// to the screen with XGame's Screen Management system.
    /// </summary>
    public interface XScreen : XBase
    {


        /// <summary>
        /// The settings object contains all the different flags a screen may need
        /// </summary>
        XScreenSettings Settings { get; }
        
        /// <summary>
        /// When this is set to true, the next game loop update will cause the
        /// screen to be removed from the screen stack, regardless of its location
        /// </summary>
        Boolean Close { get; }

        /// <summary>
        /// The update in the XScreen object
        /// </summary>
        /// <param name="aTime"></param>
        /// <param name="aEventArgs"></param>
        void Update(GameTime aTime, Input.EventArgs.XInputEventArgs aEventArgs);

        /// <summary>
        /// The draw routine in the XScreen object
        /// </summary>
        /// <param name="aSpriteBatch">The spritebatch to use</param>
        void Draw(SpriteBatch aSpriteBatch);

    }



}
